/**
 * 
 */
package com.gragra.processText.tests;
import static org.junit.Assert.*;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import org.junit.Test;
import com.gragra.processText.RemoveNumbering;
/**
 * @author Christoph Teichmann
 * created Nov 14, 2012 9:58:36 AM
 * @version 0.1
 */
public class TestRemoveNumbering
{
	/**
	 * Test method for {@link com.gragra.processText.RemoveNumbering#main(java.lang.String[])}.
	 * @throws IOException 
	 */
	@Test
	public final void testMain() throws IOException
	{
		BufferedWriter outFile = new BufferedWriter(new FileWriter("TestFileForRemoveNumbering.txt"));
		outFile.write("5034	this is the first line of the file used for testing.");
		outFile.newLine();
		outFile.write("1	this is the second line of the file used for testing.");
		outFile.close();
		RemoveNumbering.main("TestFileForRemoveNumbering.txt","ResultFileForRemoveNumbering.txt");
		BufferedReader in = new BufferedReader(new FileReader("ResultFileForRemoveNumbering.txt"));
		assertEquals("this is the first line of the file used for testing.",in.readLine());
		assertEquals("this is the second line of the file used for testing.",in.readLine());
		in.close();
	}
}